package cn.example.vip.mall.page.controller;

import cn.example.vip.mall.page.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@CrossOrigin
@Controller
@RequestMapping("/web/item")
public class ItemController {
	@Autowired
	private ItemService itemService;
	
	@GetMapping("/{id}")
	public String item(@PathVariable("id") String id, Model model) {
		return itemService.getItemPage(id);
	}
}
